package cn.hanna.springcloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author smileha
 * @create 2021-10-17 1:32
 * @description
 */
@RestController
public class OrderZKController {

    private String PAYMENT_URI = "http://cloud-payment-service";
    @Autowired
    private RestTemplate restTemplate;

    @GetMapping("/consumer/payment/zk")
    public String paymentInfo(){
        return restTemplate.getForObject(PAYMENT_URI+"/payment/zookeeper",String.class);
    }
}
